package mybatis.generator.plugin.oracle;

import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.internal.types.JavaTypeResolverDefaultImpl;

import java.sql.Types;

/**
 * 针对ORACLE自定义类型转换器
 */
public class OracleJavaTypeResolver extends JavaTypeResolverDefaultImpl {
    public OracleJavaTypeResolver() {
        super();
        //把数据库的 NVARCHAR2 映射成 String
        typeMap.put(Types.OTHER, new JdbcTypeInformation("NVARCHAR2", //$NON-NLS-1$
                new FullyQualifiedJavaType(String.class.getName())));
    }
}
